<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8">
    <title>RSA加密、RSA解密 - 在线工具 - OKTools</title>
    <meta name="keywords" content="RSA加密,RSA解密,RSA算法,RSA私钥,RSA公钥">
    <meta name="description" content="在线RSA加密、解密工具,RSA解密,RSA算法,RSA私钥,RSA公钥">
    <link rel="shortcut icon" href="/favicon.ico">
    <link href="./static/css/font-awesome/5.10.0-11/css/all.min.css" rel="stylesheet">
    <link rel="stylesheet" href="./static/css/style.css" type="text/css">
</head>
<body>
{{template "aside"}}
<main>
    <div class="container">
        <h1>RSA加密/解密</h1>
        <div class="flex mt-2">
            <div style="flex-grow:1">
                <h3>Private Key</h3>
                <textarea id="area_private_key" class="textarea mt1" rows="15"></textarea>
            </div>
            <div class="mid-menus">
                <div>
                    <select id="select_key_size" class="select">
                        <option value="512">512 bit</option>
                        <option value="1024" selected>1024 bit</option>
                        <option value="2048">2048 bit</option>
                        <option value="4096">4096 bit</option>
                    </select>
                    <button class="button primary" onclick="generateKey(this)">生成密钥</button>
                </div>
            </div>
            <div style="flex-grow:1">
                <h3>Public Key</h3>
                <textarea id="area_public_key" class="textarea mt1" rows="15"></textarea>
            </div>
        </div>
        <div class="flex mt-2">
            <div style="flex-grow:1">
                <h3>原文</h3>
                <textarea id="area_original_text" class="textarea mt1" rows="15"></textarea>
            </div>
            <div class="mid-menus">
                <div>
                    <button class="button" onclick="encrypt()">
                        <span>加密</span>
                        <i class="fa fa-arrow-right"></i>
                    </button>
                    <button class="button" onclick="decrypt()">
                        <i class="fa fa-arrow-left"></i>
                        <span>解密</span>
                    </button>
                </div>
            </div>
            <div style="flex-grow:1">
                <h3>密文</h3>
                <textarea id="area_cipher_text" class="textarea mt1" rows="15"></textarea>
            </div>
        </div>
    </div>
</main>
<script src="./static/js/jsencrypt/3.0.0-rc.1/jsencrypt.min.js"></script>
<script src="./static/js/encrypt_rsa.js"></script>
</body>
</html>